Carbon


GetIndexedSubControl

Header: Controls.h Carbon status: Supported

Obtains a handle to a specified embedded control.

OSErr GetIndexedSubControl (
    ControlRef inControl, 
    UInt16 inIndex, 
    ControlRef *outSubControl
);
inControl

A handle to an embedder control.

inIndex

A 1-based index—an integer between 1 and the value returned in the outNumChildren parameter of CountSubControls—specifying the control you wish to access.

outSubControl

On input, a pointer to a ControlHandle value. On return, the ControlHandle value is set to a handle to the embedded control.

function result

A result code. If the index passed in is invalid, the paramErr result code is returned.

DISCUSSION

The GetIndexedSubControl function is useful for iterating over the control hierarchy. Also, the value of a radio group control is the index of its currently selected embedded radio button control. So, passing the current value of a radio group control into GetIndexedSubControl will give you a handle to the currently selected radio button control.

VERSION NOTES

This function is available with Appearance Manager 1.0 and later.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)